package com.neuronbit.businessflow.flow.project;


import com.neuronbit.businessflow.flow.BpmFile;
import com.neuronbit.businessflow.flow.clazz.ClassInfo;
import com.neuronbit.javaparser.ast.CompilationUnit;

import javax.xml.stream.XMLStreamException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;

/**
 * The interface Project.
 */
public interface Project {
    /**
     * Gets output path.
     *
     * @return the output path
     */
    Path getOutputPath();

    /**
     * Gets file.
     *
     * @param fileName the file name
     * @return the file
     */
    File getFile(String fileName);

    /**
     * Gets path.
     *
     * @return the path
     */
    Path getPath();

    /**
     * Gets api definition paths.
     *
     * @return the api definition paths
     */
    List<File> getApiDefinitionPaths();

    /**
     * Scan bpm files set.
     *
     * @return the set
     * @throws XMLStreamException the xml stream exception
     * @throws IOException        the io exception
     */
    Set<BpmFile> scanBpmFiles() throws XMLStreamException, IOException;

    /**
     * Find class info.
     *
     * @param type the type
     * @return the class info
     */
    ClassInfo find(String type);

    /**
     * Parse java compilation unit.
     *
     * @param javaFile the java file
     * @return the compilation unit
     * @throws FileNotFoundException the file not found exception
     */
    CompilationUnit parseJava(File javaFile) throws FileNotFoundException;
}
